<?php
ini_set('session.bug_compat_warn', 0);
ini_set('session.bug_compat_42', 0);
header ('Content-type: text/html; charset=utf-8');

function getMenu()
{
	/*****************en menu content*/
	//init en menu
	//$menuen;
	$menuen= array("searchengines,Search engines","dictionaries,Dictionary");
	//init la menu
	//$menula;
	/****************lao menu contents********************/
	
	$menula= array("searchengines,ເຄື່ອງຈັກຄົ້ນຫາ","dictionaries,ປະທານຸກົມ");
	
		
	/***********************************/
	$lang=$_SESSION["lang"];
	$menu= array("","");;
	
	if($lang=="en")
	$menu=$menuen;
	else if($lang=="la")
	$menu=$menula;
	else
	$menu=$menula;
	$_SESSION["lang"]="la";
	return $menu;
	}
function initParams($params)
{
	//lang,menu
	//param is an array 
	$_SESSION["lang"]=$_GET["lang"];
	$_SESSION["contents"]=$_GET["contents"];
	$_SESSION["mode"]=$_GET["mode"];
	$_SESSION["packageid"]=$_GET["packageid"];
	$_SESSION["kw"]=trim($_GET["kw"]);

	$_SESSION["dictid"]=$_GET["dictid"];
	$_SESSION["paramid"]=$_GET["paramid"];	 	
	$_SESSION["zone"]=$_GET["zone"]; 
	initLinksAgruement();		
}
function initLinksAgruement()
{
	$_SESSION["arg"]="";
	if($_SESSION["lang"]!="")
		$_SESSION["arg"].=@"&lang=".$_SESSION["lang"];
	if($_SESSION["contents"]!="")
		$_SESSION["arg"].="&contents=".$_SESSION["contents"];
	if($_SESSION["mode"]!="")
		$_SESSION["arg"].="&mode=".$_SESSION["mode"];
	//if($_SESSION["packageid"]!="")
		//$_SESSION["arg"].="&packageid=".$_SESSION["packageid"];
		//die("arg".$_SESSION["arg"]);
	//if(isset($_SESSION["packageid"]))
		//$_SESSION["arg"]="&packageid=".$_SESSION["packageid"];
	//if(isset($_SESSION["lang"]))
		//$_SESSION["arg"]="&lang=".$_SESSION["lang"];
	//if(isset($_SESSION["lang"]))
		//$_SESSION["arg"]="&lang=".$_SESSION["lang"];
	
	}
function initConnection()
{
	include_once("./configs/config.php");
	
	
}
?>